package ecmnext.gclient.gui;

/***************************************************************/
/*                     SOFTWARE SECTION                        */
/***************************************************************/
/*
 * <p>Name: ECMNext</p>
 * <p>Description: Simulation of the platform of trading Software</p>
 * <p>Licence: General Public License</p>
 * <p>Organisation: EC Marseille</p>
 * <p>Persons involved in the project : groupE Plateforme de Trading</p>
 * <p>Current version: 1.0</p>
 */


/***************************************************************/
/*                       IMPORT SECTION                        */
/***************************************************************/



import java.awt.*;

import javax.swing.*;
import javax.swing.border.*;
import javax.swing.event.*;

import org.jdom.*;
import ecmnext.business.*;
import ecmnext.client.*;
import ecmnext.client.event.*;


import ecmnext.utils.*;
import ecmnext.utils.gui.JLabelRenderer;


/***************************************************************/
/*           Managed Assets CLASS SECTION                 */
/***************************************************************/
/**
 * <p>Title : Managed Assets</p>
 * <p>Description : </p>
 * @author Xuewen YANG ET Antoine COUDERC
 * @version 1.0
 */


public class ManagedAssets extends JPanel
       implements Constants{


  JScrollPane ScrollPaneManagedAssets = new JScrollPane();
  Border border1;
  PortfolioTableModel tableJTable2Model = new PortfolioTableModel(new String[] {"Asset Name"," Quantity"});
  GridBagLayout gridBagLayoutManagedAssets = new GridBagLayout();
  JTable TableManagedAssets = new JTable(tableJTable2Model);



  public ManagedAssets() {
     jbInit();
 }
  public void jbInit() {

    border1 = new TitledBorder(BorderFactory.createEmptyBorder(6,6,6,6),"My Portfolio",TitledBorder.DEFAULT_JUSTIFICATION,TitledBorder.DEFAULT_POSITION,FONT_CLIENT_TITLE_BORDER);
    this.setEnabled(true);
    this.setBorder(border1);
    this.setMinimumSize(new Dimension(50, 110));
    this.setOpaque(true);
    this.setPreferredSize(new Dimension(200, 110));
    this.setLayout(gridBagLayoutManagedAssets);
    this.add(ScrollPaneManagedAssets, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.5
        ,GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));


    ScrollPaneManagedAssets.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    ScrollPaneManagedAssets.setAutoscrolls(false);
    ScrollPaneManagedAssets.setRequestFocusEnabled(true);
    ScrollPaneManagedAssets.getViewport().add(TableManagedAssets, null);

    TableManagedAssets.setRowSelectionAllowed(false);
    TableManagedAssets.getColumnModel().getColumn(0).setCellRenderer(new
        JLabelRenderer());
    TableManagedAssets.getColumnModel().getColumn(1).setCellRenderer(new
        JLabelRenderer());
    TableManagedAssets.setRowHeight(18);

  }


}
